package zhuyun.code.launcheractivity.utils

import android.content.Context
import zhuyun.code.launcheractivity.App

/**
 * @author: Administrator
 * @date: 2021/11/17
 */
object UIUitls {
    val context = App.context
    fun dp2px(dp:Float):Int{
        return (context.resources.displayMetrics.density*dp + 0.5f).toInt()
    }
    fun px2dp(px:Float):Int{
        return (context.resources.displayMetrics.density+0.5f).toInt()

    }

}